
#ifndef TYPES_H
#define TYPES_H

#include "D3D11.h"
#include "xnamath.h"

#include <string>

struct Vertex
{
	Vertex(){};
	Vertex(float x, float y, float z, 
		float tx, float ty, float tz,
		float nx, float ny, float nz, 
		float u, float v)
		: mPosition(x,y,z), mTangent(tx, ty, tz), mNormal(nx,ny,nz), mTexC(u,v){};

	XMFLOAT3 mPosition;
	XMFLOAT3 mNormal;
	XMFLOAT3 mTangent;
	XMFLOAT2 mTexC;
};

struct SubsetData
{
	DWORD mStartIndex;
	DWORD mTriangleCount;

	XMFLOAT4X4 mWorld;

	XMFLOAT4 mDiffuse;
	XMFLOAT4 mSpecular;
	XMFLOAT4 mAmbient;
	XMFLOAT4 mEmission;
	float mShininess;

	std::string mDiffuseMapFilePath;
	std::string mNormalMapFilePath;
};

struct MeshData
{
	Vertex* mpVertices;
	DWORD mVertexCount;
	DWORD* mpIndices;
	DWORD mIndexCount;

	DWORD mSubsetCount;
	SubsetData* mpSubsets;

	void Release()
	{
		delete mpVertices;
		delete mpIndices;
		delete mpSubsets;
	}
};

#endif